package encdb

import (
	"fhe-search-cloud/models"

	"github.com/jmoiron/sqlx"
)

func AddManyIndexItem(tx *sqlx.Tx, indexItems []*models.IndexItem) {
	_, err := tx.NamedExec("INSERT INTO index1 (term_id, term_len, doc_id, enc_freq) VALUES (:term_id, :term_len, :doc_id, :enc_freq)", indexItems)
	if err != nil {
		panic(err)
	}
}
